class CreateImages < ActiveRecord::Migration
  def self.up
    create_table :images do |t|
      t.column :directory,    :string, :null => false
      t.column :filename,     :string, :null => false
      t.column :title1,       :string, :null => false
      t.column :title2,       :string
      t.column :location,     :string
      t.column :shotdate,     :string
      t.column :description,  :text
      t.column :forsale,      :string, :length => 1
      t.column :forlicense,   :string, :length => 1
      t.column :keywords,     :text
      t.column :geocode,      :string
      t.column :camera,       :string
      t.column :shutterspd,   :string
      t.column :fstop,        :string
      t.column :iso,          :string
      t.column :lens,         :string
      t.column :photographer, :string
      t.column :view_count,   :integer
      t.column :last_viewed,  :datetime
      t.column :created_on,   :datetime
    end
  end

  def self.down
    drop_table :images
  end
end
